import QtQuick
import QtQuick.Controls
import Qt5Compat.GraphicalEffects

ApplicationWindow {
    title: "GraphicalEffects"
    visible: true
    width: 800
    height: 600

    // 背景图片
    Image {
        id: backgroundImage
        anchors.fill: parent
        source: "qrc:/view.jpg"
        fillMode: Image.PreserveAspectCrop
    }

    // 模糊效果
    FastBlur {
        anchors.fill: backgroundImage
        source: backgroundImage
        radius: 32 // 模糊半径，值越大越模糊
    }

    // 前景内容
    Rectangle {
        width: 300
        height: 200
        anchors.centerIn: parent
        color: "#60ffffff" // 半透明白色
        radius: 10

        Text {
            anchors.centerIn: parent
            text: "背景模糊效果"
            font.pixelSize: 24
            color: "#333333"
        }
    }
}
